<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArNetServer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArNetServer.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArNetServer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArNetServer Class Reference<div class="ingroups"><a class="el" href="group__OptionalClasses.html">Optional Classes</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Class for running a simple net server to send/recv commands via text.  
 <a href="classArNetServer.html#details">More...</a></p>

<p><code>#include &lt;ArNetServer.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:afb0b05acf65940aa9901180c3d30d90f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#afb0b05acf65940aa9901180c3d30d90f">addCommand</a> (const char *command, <a class="el" href="classArFunctor3.html">ArFunctor3</a>&lt; char **, int, <a class="el" href="classArSocket.html">ArSocket</a> * &gt; *functor, const char *help)</td></tr>
<tr class="memdesc:afb0b05acf65940aa9901180c3d30d90f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a new command.  <a href="#afb0b05acf65940aa9901180c3d30d90f">More...</a><br /></td></tr>
<tr class="separator:afb0b05acf65940aa9901180c3d30d90f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb2596fe97147dc3a97ba7456b832182"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb2596fe97147dc3a97ba7456b832182"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#adb2596fe97147dc3a97ba7456b832182">ArNetServer</a> (bool addAriaExitCB=true, bool doNotAddShutdownServer=false, const char *name=&quot;ArNetServer&quot;, ArNetServer *childServer=NULL)</td></tr>
<tr class="memdesc:adb2596fe97147dc3a97ba7456b832182"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:adb2596fe97147dc3a97ba7456b832182"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a585cbb215a87b295fe779b5a3f51a49d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a585cbb215a87b295fe779b5a3f51a49d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a585cbb215a87b295fe779b5a3f51a49d">close</a> (void)</td></tr>
<tr class="memdesc:a585cbb215a87b295fe779b5a3f51a49d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the server. <br /></td></tr>
<tr class="separator:a585cbb215a87b295fe779b5a3f51a49d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae350d8c6fbfaf5eb56119a180052f90c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae350d8c6fbfaf5eb56119a180052f90c"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#ae350d8c6fbfaf5eb56119a180052f90c">getExtraString</a> (void)</td></tr>
<tr class="memdesc:ae350d8c6fbfaf5eb56119a180052f90c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets an extra string that the server holds for passing around. <br /></td></tr>
<tr class="separator:ae350d8c6fbfaf5eb56119a180052f90c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8898066cda1bfcd97f3a64932f8fc854"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a8898066cda1bfcd97f3a64932f8fc854">getLoggingDataReceived</a> (void)</td></tr>
<tr class="memdesc:a8898066cda1bfcd97f3a64932f8fc854"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets whether we are logging all data received or not.  <a href="#a8898066cda1bfcd97f3a64932f8fc854">More...</a><br /></td></tr>
<tr class="separator:a8898066cda1bfcd97f3a64932f8fc854"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a085deea8c6bc035b2662e71a64660ac8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a085deea8c6bc035b2662e71a64660ac8">getLoggingDataSent</a> (void)</td></tr>
<tr class="memdesc:a085deea8c6bc035b2662e71a64660ac8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets whether we are logging all data sent or not.  <a href="#a085deea8c6bc035b2662e71a64660ac8">More...</a><br /></td></tr>
<tr class="separator:a085deea8c6bc035b2662e71a64660ac8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bbaffbed3c5c8b754fb2dc708f406d0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9bbaffbed3c5c8b754fb2dc708f406d0"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a9bbaffbed3c5c8b754fb2dc708f406d0">getName</a> (void)</td></tr>
<tr class="memdesc:a9bbaffbed3c5c8b754fb2dc708f406d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the name of this instance. <br /></td></tr>
<tr class="separator:a9bbaffbed3c5c8b754fb2dc708f406d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a147e7ed93f89d4d8e074ea7d9a56da2a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a147e7ed93f89d4d8e074ea7d9a56da2a">getUseWrongEndChars</a> (void)</td></tr>
<tr class="memdesc:a147e7ed93f89d4d8e074ea7d9a56da2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets whether we're using the wrong (legacy) end chars or not.  <a href="#a147e7ed93f89d4d8e074ea7d9a56da2a">More...</a><br /></td></tr>
<tr class="separator:a147e7ed93f89d4d8e074ea7d9a56da2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a613d3d2cb636c6333eb6c61dd1d44e9d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a613d3d2cb636c6333eb6c61dd1d44e9d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a613d3d2cb636c6333eb6c61dd1d44e9d">internalAddSocketToDeleteList</a> (<a class="el" href="classArSocket.html">ArSocket</a> *socket)</td></tr>
<tr class="memdesc:a613d3d2cb636c6333eb6c61dd1d44e9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">The internal function that adds a client to our delete list. <br /></td></tr>
<tr class="separator:a613d3d2cb636c6333eb6c61dd1d44e9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbd859c31cb329d5a7704d535760b78c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abbd859c31cb329d5a7704d535760b78c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#abbd859c31cb329d5a7704d535760b78c">internalAddSocketToList</a> (<a class="el" href="classArSocket.html">ArSocket</a> *socket)</td></tr>
<tr class="memdesc:abbd859c31cb329d5a7704d535760b78c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The internal function that adds a client to our list. <br /></td></tr>
<tr class="separator:abbd859c31cb329d5a7704d535760b78c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acaef493c4dcbadbfe6a7f7489dd91ee0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acaef493c4dcbadbfe6a7f7489dd91ee0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#acaef493c4dcbadbfe6a7f7489dd91ee0">internalEcho</a> (char **argv, int argc, <a class="el" href="classArSocket.html">ArSocket</a> *socket)</td></tr>
<tr class="memdesc:acaef493c4dcbadbfe6a7f7489dd91ee0"><td class="mdescLeft">&#160;</td><td class="mdescRight">The internal function for echo. <br /></td></tr>
<tr class="separator:acaef493c4dcbadbfe6a7f7489dd91ee0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3333b501d77a8429ab436501245aafa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab3333b501d77a8429ab436501245aafa"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#ab3333b501d77a8429ab436501245aafa">internalGreeting</a> (<a class="el" href="classArSocket.html">ArSocket</a> *socket)</td></tr>
<tr class="memdesc:ab3333b501d77a8429ab436501245aafa"><td class="mdescLeft">&#160;</td><td class="mdescRight">the internal function that gives the greeting message <br /></td></tr>
<tr class="separator:ab3333b501d77a8429ab436501245aafa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4efa2b4d5cb77d30818006ceec44d6a9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4efa2b4d5cb77d30818006ceec44d6a9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a4efa2b4d5cb77d30818006ceec44d6a9">internalHelp</a> (<a class="el" href="classArSocket.html">ArSocket</a> *socket)</td></tr>
<tr class="memdesc:a4efa2b4d5cb77d30818006ceec44d6a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">The internal function that does the help. <br /></td></tr>
<tr class="separator:a4efa2b4d5cb77d30818006ceec44d6a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2cde94f0d6a9b8988a03b8eeae68302"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af2cde94f0d6a9b8988a03b8eeae68302"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#af2cde94f0d6a9b8988a03b8eeae68302">internalHelp</a> (char **argv, int argc, <a class="el" href="classArSocket.html">ArSocket</a> *socket)</td></tr>
<tr class="memdesc:af2cde94f0d6a9b8988a03b8eeae68302"><td class="mdescLeft">&#160;</td><td class="mdescRight">The internal function for the help cb. <br /></td></tr>
<tr class="separator:af2cde94f0d6a9b8988a03b8eeae68302"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a787480726e054180ff73d882f63003f2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a787480726e054180ff73d882f63003f2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a787480726e054180ff73d882f63003f2">internalQuit</a> (char **argv, int argc, <a class="el" href="classArSocket.html">ArSocket</a> *socket)</td></tr>
<tr class="memdesc:a787480726e054180ff73d882f63003f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">The internal function for closing this connection. <br /></td></tr>
<tr class="separator:a787480726e054180ff73d882f63003f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d419812d0e22c5b5a06554422a63d43"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1d419812d0e22c5b5a06554422a63d43"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a1d419812d0e22c5b5a06554422a63d43">internalShutdownServer</a> (char **argv, int argc, <a class="el" href="classArSocket.html">ArSocket</a> *socket)</td></tr>
<tr class="memdesc:a1d419812d0e22c5b5a06554422a63d43"><td class="mdescLeft">&#160;</td><td class="mdescRight">The internal function for shutting down. <br /></td></tr>
<tr class="separator:a1d419812d0e22c5b5a06554422a63d43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a757cde3ca5c10e425b52947a40ec9576"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a757cde3ca5c10e425b52947a40ec9576"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a757cde3ca5c10e425b52947a40ec9576">isOpen</a> (void)</td></tr>
<tr class="memdesc:a757cde3ca5c10e425b52947a40ec9576"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sees if the server is running and open. <br /></td></tr>
<tr class="separator:a757cde3ca5c10e425b52947a40ec9576"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adad67a2984e10158d2f3fc2aa9d76848"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adad67a2984e10158d2f3fc2aa9d76848"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#adad67a2984e10158d2f3fc2aa9d76848">lock</a> ()</td></tr>
<tr class="memdesc:adad67a2984e10158d2f3fc2aa9d76848"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lock the server. <br /></td></tr>
<tr class="separator:adad67a2984e10158d2f3fc2aa9d76848"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2adba95c22d9c26a043607e0d9eca6fb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a2adba95c22d9c26a043607e0d9eca6fb">open</a> (<a class="el" href="classArRobot.html">ArRobot</a> *robot, unsigned int port, const char *password, bool multipleClients=true, const char *openOnIP=NULL)</td></tr>
<tr class="memdesc:a2adba95c22d9c26a043607e0d9eca6fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the server.  <a href="#a2adba95c22d9c26a043607e0d9eca6fb">More...</a><br /></td></tr>
<tr class="separator:a2adba95c22d9c26a043607e0d9eca6fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae6ec2c5068f345ba6b71eac5feb14b7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aae6ec2c5068f345ba6b71eac5feb14b7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#aae6ec2c5068f345ba6b71eac5feb14b7">parseCommandOnSocket</a> (<a class="el" href="classArArgumentBuilder.html">ArArgumentBuilder</a> *args, <a class="el" href="classArSocket.html">ArSocket</a> *socket, bool allowLog=true)</td></tr>
<tr class="memdesc:aae6ec2c5068f345ba6b71eac5feb14b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">The internal function for parsing a command on a socket. <br /></td></tr>
<tr class="separator:aae6ec2c5068f345ba6b71eac5feb14b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcd9ebd2b558cee0f7b7cebeb19668c0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#abcd9ebd2b558cee0f7b7cebeb19668c0">remCommand</a> (const char *command)</td></tr>
<tr class="memdesc:abcd9ebd2b558cee0f7b7cebeb19668c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes a command.  <a href="#abcd9ebd2b558cee0f7b7cebeb19668c0">More...</a><br /></td></tr>
<tr class="separator:abcd9ebd2b558cee0f7b7cebeb19668c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e9492bc9ae8b1532e03011e905d17ef"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e9492bc9ae8b1532e03011e905d17ef"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a8e9492bc9ae8b1532e03011e905d17ef">runOnce</a> (void)</td></tr>
<tr class="memdesc:a8e9492bc9ae8b1532e03011e905d17ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">the internal sync task we use for our loop <br /></td></tr>
<tr class="separator:a8e9492bc9ae8b1532e03011e905d17ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade210003bbf1e5278c84edf02d6ab8f8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#ade210003bbf1e5278c84edf02d6ab8f8">sendToAllClients</a> (const char *str,...)</td></tr>
<tr class="memdesc:ade210003bbf1e5278c84edf02d6ab8f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends the given string to all the clients.  <a href="#ade210003bbf1e5278c84edf02d6ab8f8">More...</a><br /></td></tr>
<tr class="separator:ade210003bbf1e5278c84edf02d6ab8f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e6140b7f5a5f0e3bb556656987d2ef9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a2e6140b7f5a5f0e3bb556656987d2ef9">sendToAllClientsNextCycle</a> (const char *str,...)</td></tr>
<tr class="memdesc:a2e6140b7f5a5f0e3bb556656987d2ef9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends the given string to all the clients next cycle.  <a href="#a2e6140b7f5a5f0e3bb556656987d2ef9">More...</a><br /></td></tr>
<tr class="separator:a2e6140b7f5a5f0e3bb556656987d2ef9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbf096ab2679d161088fd89c24ddf8aa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adbf096ab2679d161088fd89c24ddf8aa"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#adbf096ab2679d161088fd89c24ddf8aa">sendToAllClientsNextCyclePlain</a> (const char *str)</td></tr>
<tr class="memdesc:adbf096ab2679d161088fd89c24ddf8aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends the given string to all the clients next cycle, no varargs. <br /></td></tr>
<tr class="separator:adbf096ab2679d161088fd89c24ddf8aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c166467363d3ff8f27ca5af52d814ae"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c166467363d3ff8f27ca5af52d814ae"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a2c166467363d3ff8f27ca5af52d814ae">sendToAllClientsNextCyclePlainBool</a> (const char *str)</td></tr>
<tr class="memdesc:a2c166467363d3ff8f27ca5af52d814ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends the given string to all the clients next cycle, no varargs... helper for config changes. <br /></td></tr>
<tr class="separator:a2c166467363d3ff8f27ca5af52d814ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a125da31f6f0e4e972ab3b4ed21a3a57c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a125da31f6f0e4e972ab3b4ed21a3a57c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a125da31f6f0e4e972ab3b4ed21a3a57c">sendToAllClientsPlain</a> (const char *str)</td></tr>
<tr class="memdesc:a125da31f6f0e4e972ab3b4ed21a3a57c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends the given string to all the clients, no varargs, wrapper for java. <br /></td></tr>
<tr class="separator:a125da31f6f0e4e972ab3b4ed21a3a57c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a154bcecd778d228733e12d59433b4694"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a154bcecd778d228733e12d59433b4694">sendToClient</a> (<a class="el" href="classArSocket.html">ArSocket</a> *socket, const char *ipString, const char *str,...)</td></tr>
<tr class="memdesc:a154bcecd778d228733e12d59433b4694"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends the given string to the (hopefully) the client given (this method may go away)  <a href="#a154bcecd778d228733e12d59433b4694">More...</a><br /></td></tr>
<tr class="separator:a154bcecd778d228733e12d59433b4694"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea4701e6336752c33f953e8468387050"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aea4701e6336752c33f953e8468387050"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#aea4701e6336752c33f953e8468387050">sendToClientPlain</a> (<a class="el" href="classArSocket.html">ArSocket</a> *socket, const char *ipString, const char *str)</td></tr>
<tr class="memdesc:aea4701e6336752c33f953e8468387050"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends the given plain string to the (hopefully) the client given (this method may go away) <br /></td></tr>
<tr class="separator:aea4701e6336752c33f953e8468387050"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a248c52b98027051b9dc704eb5a7394e1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a248c52b98027051b9dc704eb5a7394e1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a248c52b98027051b9dc704eb5a7394e1">setExtraString</a> (const char *str)</td></tr>
<tr class="memdesc:a248c52b98027051b9dc704eb5a7394e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets an extra string that the server holds for passing around. <br /></td></tr>
<tr class="separator:a248c52b98027051b9dc704eb5a7394e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a2b02fa6a8d241d641d1a85a4a9633b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a7a2b02fa6a8d241d641d1a85a4a9633b">setLoggingDataReceived</a> (bool loggingData)</td></tr>
<tr class="memdesc:a7a2b02fa6a8d241d641d1a85a4a9633b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets whether we are logging all data received or not.  <a href="#a7a2b02fa6a8d241d641d1a85a4a9633b">More...</a><br /></td></tr>
<tr class="separator:a7a2b02fa6a8d241d641d1a85a4a9633b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f7a8a45e2abcd8a1e15be1840242f2c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a6f7a8a45e2abcd8a1e15be1840242f2c">setLoggingDataSent</a> (bool loggingData)</td></tr>
<tr class="memdesc:a6f7a8a45e2abcd8a1e15be1840242f2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets whether we are logging all data sent or not.  <a href="#a6f7a8a45e2abcd8a1e15be1840242f2c">More...</a><br /></td></tr>
<tr class="separator:a6f7a8a45e2abcd8a1e15be1840242f2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0191d3877009e3f6008d773078f13e9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#ab0191d3877009e3f6008d773078f13e9">setUseWrongEndChars</a> (bool useWrongEndChars)</td></tr>
<tr class="memdesc:ab0191d3877009e3f6008d773078f13e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets whether we're using the wrong (legacy) end chars or not.  <a href="#ab0191d3877009e3f6008d773078f13e9">More...</a><br /></td></tr>
<tr class="separator:ab0191d3877009e3f6008d773078f13e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72ef70e49298ec21d93790d439ed6508"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a72ef70e49298ec21d93790d439ed6508"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a72ef70e49298ec21d93790d439ed6508">squelchNormal</a> (void)</td></tr>
<tr class="memdesc:a72ef70e49298ec21d93790d439ed6508"><td class="mdescLeft">&#160;</td><td class="mdescRight">This squelchs all the normal commands and help. <br /></td></tr>
<tr class="separator:a72ef70e49298ec21d93790d439ed6508"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8ce3b6acefffe6f45aaa657c77d83d6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac8ce3b6acefffe6f45aaa657c77d83d6"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#ac8ce3b6acefffe6f45aaa657c77d83d6">tryLock</a> ()</td></tr>
<tr class="memdesc:ac8ce3b6acefffe6f45aaa657c77d83d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Try to lock the server without blocking. <br /></td></tr>
<tr class="separator:ac8ce3b6acefffe6f45aaa657c77d83d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33d9ec5daab02a5f1b3ef29205c07047"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a33d9ec5daab02a5f1b3ef29205c07047"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a33d9ec5daab02a5f1b3ef29205c07047">unlock</a> ()</td></tr>
<tr class="memdesc:a33d9ec5daab02a5f1b3ef29205c07047"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unlock the server. <br /></td></tr>
<tr class="separator:a33d9ec5daab02a5f1b3ef29205c07047"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a616c4ccb80e620ff9147fbddaff9c5eb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a616c4ccb80e620ff9147fbddaff9c5eb"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNetServer.html#a616c4ccb80e620ff9147fbddaff9c5eb">~ArNetServer</a> ()</td></tr>
<tr class="memdesc:a616c4ccb80e620ff9147fbddaff9c5eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a616c4ccb80e620ff9147fbddaff9c5eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ad6332835d6b3d37fc6cc5f543b4c7695"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad6332835d6b3d37fc6cc5f543b4c7695"></a>
<a class="el" href="classArSocket.html">ArSocket</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myAcceptingSocket</b></td></tr>
<tr class="separator:ad6332835d6b3d37fc6cc5f543b4c7695"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af22ff24fea4e4687b2bd9edf9bd004aa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af22ff24fea4e4687b2bd9edf9bd004aa"></a>
<a class="el" href="classArFunctorC.html">ArFunctorC</a>&lt; <a class="el" href="classArNetServer.html">ArNetServer</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myAriaExitCB</b></td></tr>
<tr class="separator:af22ff24fea4e4687b2bd9edf9bd004aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a532395065be2c8e0be2fc6b2f8f02845"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a532395065be2c8e0be2fc6b2f8f02845"></a>
<a class="el" href="classArNetServer.html">ArNetServer</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myChildServer</b></td></tr>
<tr class="separator:a532395065be2c8e0be2fc6b2f8f02845"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f9929cda8681d74bf10f4acc59ee1fa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f9929cda8681d74bf10f4acc59ee1fa"></a>
std::list&lt; <a class="el" href="classArSocket.html">ArSocket</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myConnectingConns</b></td></tr>
<tr class="separator:a1f9929cda8681d74bf10f4acc59ee1fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad725d5c2dbef4627166237f85aae513f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad725d5c2dbef4627166237f85aae513f"></a>
std::list&lt; <a class="el" href="classArSocket.html">ArSocket</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myConns</b></td></tr>
<tr class="separator:ad725d5c2dbef4627166237f85aae513f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb85879f14e27dc7fdd043ef205094b3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeb85879f14e27dc7fdd043ef205094b3"></a>
std::list&lt; <a class="el" href="classArSocket.html">ArSocket</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myDeleteList</b></td></tr>
<tr class="separator:aeb85879f14e27dc7fdd043ef205094b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39f4ef0e957514262618390c86582804"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a39f4ef0e957514262618390c86582804"></a>
<a class="el" href="classArFunctor3C.html">ArFunctor3C</a>&lt; <a class="el" href="classArNetServer.html">ArNetServer</a>, char **, int, <a class="el" href="classArSocket.html">ArSocket</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myEchoCB</b></td></tr>
<tr class="separator:a39f4ef0e957514262618390c86582804"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38a44a2ebe612eb1c53f9ae611aec8c6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a38a44a2ebe612eb1c53f9ae611aec8c6"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myExtraString</b></td></tr>
<tr class="separator:a38a44a2ebe612eb1c53f9ae611aec8c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ba570ffa8b2b7a29d549ef5eb82267c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2ba570ffa8b2b7a29d549ef5eb82267c"></a>
std::map&lt; std::string, <a class="el" href="classArFunctor3.html">ArFunctor3</a>&lt; char **, int, <a class="el" href="classArSocket.html">ArSocket</a> * &gt; *, <a class="el" href="structArStrCaseCmpOp.html">ArStrCaseCmpOp</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myFunctorMap</b></td></tr>
<tr class="separator:a2ba570ffa8b2b7a29d549ef5eb82267c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2686cfe4318a188a2b094fd39db7c299"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2686cfe4318a188a2b094fd39db7c299"></a>
<a class="el" href="classArFunctor3C.html">ArFunctor3C</a>&lt; <a class="el" href="classArNetServer.html">ArNetServer</a>, char **, int, <a class="el" href="classArSocket.html">ArSocket</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myHelpCB</b></td></tr>
<tr class="separator:a2686cfe4318a188a2b094fd39db7c299"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac19c2f18c020575652e049cd2094b3f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aac19c2f18c020575652e049cd2094b3f"></a>
std::map&lt; std::string, std::string, <a class="el" href="structArStrCaseCmpOp.html">ArStrCaseCmpOp</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myHelpMap</b></td></tr>
<tr class="separator:aac19c2f18c020575652e049cd2094b3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d4f0fa0eca19d29cd98cc7ea5b8ac2d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1d4f0fa0eca19d29cd98cc7ea5b8ac2d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myLoggingDataReceived</b></td></tr>
<tr class="separator:a1d4f0fa0eca19d29cd98cc7ea5b8ac2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44ed961946a06031feda4313e3389df3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a44ed961946a06031feda4313e3389df3"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myLoggingDataSent</b></td></tr>
<tr class="separator:a44ed961946a06031feda4313e3389df3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3dae8180aeb02663dc027ae9a03a02af"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3dae8180aeb02663dc027ae9a03a02af"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myMultipleClients</b></td></tr>
<tr class="separator:a3dae8180aeb02663dc027ae9a03a02af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45b0814ceb098973525bee0c2f5262cc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45b0814ceb098973525bee0c2f5262cc"></a>
<a class="el" href="classArMutex.html">ArMutex</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myMutex</b></td></tr>
<tr class="separator:a45b0814ceb098973525bee0c2f5262cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba711f323f5f6eaf75450c732730aacb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aba711f323f5f6eaf75450c732730aacb"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myName</b></td></tr>
<tr class="separator:aba711f323f5f6eaf75450c732730aacb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d49bee4ee5cda40ea83f67926f8d772"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d49bee4ee5cda40ea83f67926f8d772"></a>
std::list&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myNextCycleSends</b></td></tr>
<tr class="separator:a5d49bee4ee5cda40ea83f67926f8d772"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5450d8c55487679047225b59d47b2af7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5450d8c55487679047225b59d47b2af7"></a>
<a class="el" href="classArMutex.html">ArMutex</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myNextCycleSendsMutex</b></td></tr>
<tr class="separator:a5450d8c55487679047225b59d47b2af7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1402e34d783632a5b2b8b2938770d162"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1402e34d783632a5b2b8b2938770d162"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myOpened</b></td></tr>
<tr class="separator:a1402e34d783632a5b2b8b2938770d162"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8793a71991922522be5cd7ae4970d200"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8793a71991922522be5cd7ae4970d200"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myPassword</b></td></tr>
<tr class="separator:a8793a71991922522be5cd7ae4970d200"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bad079679a75b80e557a4dd26852d54"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5bad079679a75b80e557a4dd26852d54"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>myPort</b></td></tr>
<tr class="separator:a5bad079679a75b80e557a4dd26852d54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54dfadae4f673b4718d4784d6870ec56"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54dfadae4f673b4718d4784d6870ec56"></a>
<a class="el" href="classArFunctor3C.html">ArFunctor3C</a>&lt; <a class="el" href="classArNetServer.html">ArNetServer</a>, char **, int, <a class="el" href="classArSocket.html">ArSocket</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myQuitCB</b></td></tr>
<tr class="separator:a54dfadae4f673b4718d4784d6870ec56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a704e3d7db9248ccc464929ef5fca83"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6a704e3d7db9248ccc464929ef5fca83"></a>
<a class="el" href="classArRobot.html">ArRobot</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myRobot</b></td></tr>
<tr class="separator:a6a704e3d7db9248ccc464929ef5fca83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad88d44960e3c5d1c23116f99f0c254d4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad88d44960e3c5d1c23116f99f0c254d4"></a>
<a class="el" href="classArSocket.html">ArSocket</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myServerSocket</b></td></tr>
<tr class="separator:ad88d44960e3c5d1c23116f99f0c254d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a381c10e0c345bdc42ac71111dcb463a4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a381c10e0c345bdc42ac71111dcb463a4"></a>
<a class="el" href="classArFunctor3C.html">ArFunctor3C</a>&lt; <a class="el" href="classArNetServer.html">ArNetServer</a>, char **, int, <a class="el" href="classArSocket.html">ArSocket</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myShutdownServerCB</b></td></tr>
<tr class="separator:a381c10e0c345bdc42ac71111dcb463a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a949114ce3efc94772eb9b32ed8a85810"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a949114ce3efc94772eb9b32ed8a85810"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>mySquelchNormal</b></td></tr>
<tr class="separator:a949114ce3efc94772eb9b32ed8a85810"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54502367b7c5cb29db8d5defbbd15059"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54502367b7c5cb29db8d5defbbd15059"></a>
<a class="el" href="classArFunctorC.html">ArFunctorC</a>&lt; <a class="el" href="classArNetServer.html">ArNetServer</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myTaskCB</b></td></tr>
<tr class="separator:a54502367b7c5cb29db8d5defbbd15059"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa8b25ed046dc70fbbd4e7950df1ed80"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afa8b25ed046dc70fbbd4e7950df1ed80"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myUseWrongEndChars</b></td></tr>
<tr class="separator:afa8b25ed046dc70fbbd4e7950df1ed80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdef51ec0587095f07ee71ab9f1a70c9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afdef51ec0587095f07ee71ab9f1a70c9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myWantToClose</b></td></tr>
<tr class="separator:afdef51ec0587095f07ee71ab9f1a70c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class for running a simple net server to send/recv commands via text. </p>
<p>This class is for running a simple server which will have a list of commands to use and a fairly simple set of interactions... Start the server with the <a class="el" href="classArNetServer.html#a2adba95c22d9c26a043607e0d9eca6fb" title="Initializes the server. ">open()</a> function, add commands with the <a class="el" href="classArNetServer.html#afb0b05acf65940aa9901180c3d30d90f" title="Adds a new command. ">addCommand()</a> function and remove commands with <a class="el" href="classArNetServer.html#abcd9ebd2b558cee0f7b7cebeb19668c0" title="Removes a command. ">remCommand()</a>, and close the server with the <a class="el" href="classArNetServer.html#a585cbb215a87b295fe779b5a3f51a49d" title="Closes the server. ">close()</a> function.</p>
<p>A client can connect via TCP on the port provided to <a class="el" href="classArNetServer.html#a2adba95c22d9c26a043607e0d9eca6fb" title="Initializes the server. ">open()</a> and send a line of text where the first word is the command and the following words are extra arguments or data (space separated). The line should end with a newline ("\n") or carriage return character. The first line sent should be a password and must match the password given to <a class="el" href="classArNetServer.html#a2adba95c22d9c26a043607e0d9eca6fb" title="Initializes the server. ">open()</a> in order to continue.</p>
<p>You can use the "telnet" program as a general client to any <a class="el" href="classArNetServer.html" title="Class for running a simple net server to send/recv commands via text. ">ArNetServer</a> server.</p>
<p>It has a built in mutex, if you only use <a class="el" href="classArNetServer.html#ade210003bbf1e5278c84edf02d6ab8f8" title="Sends the given string to all the clients. ">sendToAllClients()</a> through the normal commands or during the robot loop you don't need to worry about locking anything and the server is locked before any of the callbacks for the commands are called so you really only need to lock the server if you're dealing with from another thread.... From another thread you can use sendToAllClientsNextCycle which takes care of all the locking itself in a threadsafe way (it puts the message in a list, then sends it in the next cycle of the loop). The only real reason to use the lock/sendToAllClients/unlock method is if you're highly concerned about synchronizing the different types of output. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="netServerExample_8cpp-example.html#_a3">netServerExample.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="afb0b05acf65940aa9901180c3d30d90f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArNetServer::addCommand </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArFunctor3.html">ArFunctor3</a>&lt; char **, int, <a class="el" href="classArSocket.html">ArSocket</a> * &gt; *&#160;</td>
          <td class="paramname"><em>functor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>help</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds a new command. </p>
<p>This adds a command to the list, when the command is given the broken up argv and argc are given along with the socket it came from (so that acks can occur) </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="netServerExample_8cpp-example.html#a7">netServerExample.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a8898066cda1bfcd97f3a64932f8fc854"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArNetServer::getLoggingDataReceived </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets whether we are logging all data received or not. </p>
<dl class="section return"><dt>Returns</dt><dd>if true data will be logged which means that all commands received from clients are logged </dd></dl>

</div>
</div>
<a class="anchor" id="a085deea8c6bc035b2662e71a64660ac8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArNetServer::getLoggingDataSent </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets whether we are logging all data sent or not. </p>
<dl class="section return"><dt>Returns</dt><dd>if true data will be logged which means that all data sent out to the all the clients will be logged </dd></dl>

</div>
</div>
<a class="anchor" id="a147e7ed93f89d4d8e074ea7d9a56da2a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArNetServer::getUseWrongEndChars </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets whether we're using the wrong (legacy) end chars or not. </p>
<dl class="section return"><dt>Returns</dt><dd>if true data will be logged which means that all data sent out to the all the clients will be logged </dd></dl>

</div>
</div>
<a class="anchor" id="a2adba95c22d9c26a043607e0d9eca6fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArNetServer::open </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArRobot.html">ArRobot</a> *&#160;</td>
          <td class="paramname"><em>robot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>multipleClients</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>openOnIP</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the server. </p>
<p>Open the server, if you supply a robot this will run in the robots attached, if you do not supply a robot then it will be open and you'll have to call runOnce yourself (this is only recommended for advanced users)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">robot</td><td>the robot that this should be attached to and run in the sync task of or NULL not to run in any robot's task</td></tr>
    <tr><td class="paramname">port</td><td>the port to start up the service on</td></tr>
    <tr><td class="paramname">password</td><td>the password needed to use the service</td></tr>
    <tr><td class="paramname">multipleClients</td><td>if false only one client is allowed to connect, if false multiple clients are allowed to connect or just one</td></tr>
    <tr><td class="paramname">openOnIP</td><td>If not NULL, restrict server port to the network interface with this IP address. If NULL, accept connections from any network interface.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the server could be started, false otherwise </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="netServerExample_8cpp-example.html#a5">netServerExample.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="abcd9ebd2b558cee0f7b7cebeb19668c0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArNetServer::remCommand </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>command</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes a command. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>the command to remove </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the command was there to remove, false otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="ade210003bbf1e5278c84edf02d6ab8f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArNetServer::sendToAllClients </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends the given string to all the clients. </p>
<p>This sends the given string to all the clients, this string cannot be more than 2048 number of bytes.</p>
<p>See also the notes on locking in the class description. </p>
<p><b>Java and Python Wrappers:</b> Not available in Java or Python wrapper libraries. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classArNetServer.html#a125da31f6f0e4e972ab3b4ed21a3a57c" title="Sends the given string to all the clients, no varargs, wrapper for java. ">sendToAllClientsPlain()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a2e6140b7f5a5f0e3bb556656987d2ef9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArNetServer::sendToAllClientsNextCycle </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends the given string to all the clients next cycle. </p>
<p>This sends the given string to all the clients, this string cannot be more than 2048 number of bytes.</p>
<p><b>Java and Python Wrappers:</b> Not available in Java or Python wrapper libraries. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classArNetServer.html#adbf096ab2679d161088fd89c24ddf8aa" title="Sends the given string to all the clients next cycle, no varargs. ">sendToAllClientsNextCyclePlain()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a154bcecd778d228733e12d59433b4694"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArNetServer::sendToClient </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArSocket.html">ArSocket</a> *&#160;</td>
          <td class="paramname"><em>socket</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>ipString</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends the given string to the (hopefully) the client given (this method may go away) </p>
<p>This sends the given string to all the clients, this string cannot be more than 2048 number of bytes.</p>
<p><b>Java and Python Wrappers:</b> Not available in Java or Python wrapper libraries. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classArNetServer.html#aea4701e6336752c33f953e8468387050" title="Sends the given plain string to the (hopefully) the client given (this method may go away) ...">sendToClientPlain()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7a2b02fa6a8d241d641d1a85a4a9633b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArNetServer::setLoggingDataReceived </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>loggingData</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets whether we are logging all data received or not. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">loggingData</td><td>if true data will be logged which means that all commands received from clients are logged </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6f7a8a45e2abcd8a1e15be1840242f2c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArNetServer::setLoggingDataSent </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>loggingData</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets whether we are logging all data sent or not. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">loggingData</td><td>if true data will be logged which means that all data sent out to the all the clients will be logged </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab0191d3877009e3f6008d773078f13e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArNetServer::setUseWrongEndChars </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>useWrongEndChars</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets whether we're using the wrong (legacy) end chars or not. </p>
<p>Set reverse line ending characters for compatibility with certain old clients.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">useWrongEndChars</td><td>if true the wrong end chars will be sent ('\n\r' instead of '\r\n'); a nonstandard, deprecated line ending, but may be required for certain old clients. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArNetServer.h</li>
<li>ArNetServer.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArNetServer.html">ArNetServer</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
